﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Topcoder
{
    namespace SRM546
    {
        class TwoRectangles
        {
            public static string describeIntersection(int[] A, int[] B)
            {
                int x = c(A[0], A[2], B[0], B[2]);
                int y = c(A[1], A[3], B[1], B[3]);

                if ((x == 1) || (y == 1)) return "none";
                if ((x == -1) && (y == -1)) return "rectangle";
                if ((x == 0) && (y == 0)) return "point";
                else return "segment";
            }
            private static int c(int a1, int a2, int b1, int b2)
            {
                if ((a1 == b2) || (a2 == b1)) return 0;
                if ((a2 < b1) || (a1 > b2)) return 1;
                else return -1;
            }
        }
    }
}
